package com.itheima.day09.Zuoye.ZuoYe6;

import java.util.Objects;

public class Film {
    private String name;
    private double point;

    @Override
    public String toString() {
        return "Film{" +
                "name='" + name + '\'' +
                ", point=" + point +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Film film = (Film) o;
        return Double.compare(point, film.point) == 0 && Objects.equals(name, film.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, point);
    }

    public Film() {
    }

    public Film(String name, double point) {
        this.name = name;
        this.point = point;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPoint() {
        return point;
    }

    public void setPoint(double point) {
        this.point = point;
    }
}
